<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript">
			var sj = Math.floor(Math.random()*100+1);
			function cai(){
				var put = document.getElementById("inputId").value;
				var sr = parseInt(put);
				var put1 = document.getElementById("output");
				if(sj > sr){
					put1.innerHTML = "小了";
				}else if(sj < sr){
					put1.innerHTML = "大了";
				}else if(sj == sr){
					put1.innerHTML = "恭喜";
				}
			}
		</script>
	</head>
	<body>
		<input type="text" id="inputId" />
		<input type="button" value="猜" onclick="cai()" />
		<span id="output"></span>
	</body>
</html>
